#!/usr/bin/env coffee

{CACHE} = require('../fckoa/db/redis')

do ->
    # key = "test"
    # val = (new Date()).toISOString()
    # console.log(await CACHE.get(key))
    # console.log(await CACHE.setex(key, 1, val))
    # console.log(await CACHE.get(key))
    # setTimeout(
    #     ->
    #         console.log(await CACHE.get(key))
    #     500
    # )
    # setTimeout(
    #     ->
    #         console.log(await CACHE.get(key))
    #     1000
    # )
    console.log(await CACHE.keys("*"))
    #CACHE.flushdb()
    process.exit()
